scanner_sources = [
  'scanner.cpp',
  'scanner_abi.cpp',
  'interface/i_scanner.cpp',
]

scanner_static_lib = static_library(
  'Scanner',
  scanner_sources,
  include_directories: include_dirs,
  dependencies: [dev_deps],
  install: false,
)

scanner_lib = shared_library(
  'Scanner',
  include_directories: include_dirs,
  name_prefix: 'lib',
  name_suffix: 'so',
  install: true,
  install_dir: drivers_install_dir,
  link_whole: [scanner_static_lib],
)

scanner_dep = declare_dependency(
  link_with: scanner_lib,
  dependencies: [libmcpp_deps],
)

if build_tests
  custom_target(
    'copy_libScanner',
    output: 'copy_libScanner',
    command: ['cp', scanner_lib.full_path(), drivers_install_dir],
    depends: scanner_lib,
    build_by_default: true,
  )
endif